﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Best.SmartCms.Domain.Common;

namespace Best.SmartCms.Domain
{
    [Table("Product")]
    public class Product:BaseDomain
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        [StringLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 商品分类
        /// </summary>
        public long CategoryId { get; set; }

        /// <summary>
        /// 是否上架
        /// </summary>
        public bool IsShelf { get; set; }
        /// <summary>
        /// 销售价格
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 商品原价
        /// </summary>
        public decimal OldPrice { get; set; }
        /// <summary>
        /// 成本价格
        /// </summary>
        public decimal ProductCost { get; set; }
        /// <summary>
        /// 商家SKU
        /// </summary>
        [StringLength(50)]
        public string SKU { get; set; }
        /// <summary>
        /// 商品详情
        /// </summary>
        [StringLength(5000)]
        public string Content { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public int StockQuantity { get; set; }
        /// <summary>
        /// 已售数量
        /// </summary>
        public int SoldQuantity { get; set; }
        /// <summary>
        /// 关键字
        /// </summary>
        [StringLength(500)]
        public string Keywords { get; set; }
        /// <summary>
        /// 重量
        /// </summary>
        public decimal? Weight { get; set; }
        /// <summary>
        /// 长度
        /// </summary>
        public decimal? Length { get; set; }
        /// <summary>
        /// 宽度
        /// </summary>
        public decimal? Width { get; set; }
        /// <summary>
        /// 高度
        /// </summary>
        public decimal? Height { get; set; }

        /// <summary>
        /// 是否推荐
        /// </summary>
        public bool IsTuijian { get; set; }
    }
}
